/// @Author  jingze
/// @Date  2022/5/17 19:52
/// @Title      token_model
/// @Todo  todo
/// @Version 1.0
class TokenModel {
  String? refreshToken;
  int? expiresIn;
  String? scope;
  String? sessionKey;
  String? accessToken;
  String? sessionSecret;

  TokenModel(
      {required this.refreshToken,
      required this.expiresIn,
      required this.scope,
      required this.sessionKey,
      required this.accessToken,
      required this.sessionSecret});

  TokenModel.fromJson(Map<String, dynamic> json) {
    refreshToken = json['refresh_token'];
    expiresIn = json['expires_in'];
    scope = json['scope'];
    sessionKey = json['session_key'];
    accessToken = json['access_token'];
    sessionSecret = json['session_secret'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['refresh_token'] = refreshToken;
    data['expires_in'] = expiresIn;
    data['scope'] = scope;
    data['session_key'] = sessionKey;
    data['access_token'] = accessToken;
    data['session_secret'] = sessionSecret;
    return data;
  }
}
